package org.example.enums;

import lombok.Getter;

@Getter
public enum OpenMethodEnums {
    LOCAL("local","现场开户"),

    REMOTE("remote","远程开户")
        ;
    private String code;

    private String name;

    OpenMethodEnums(String code,String name){
        this.code=code;
        this.name=name;
    }

    public static OpenMethodEnums getEnums(String code){
        for (OpenMethodEnums methodEnums:OpenMethodEnums.values()) {
            if(methodEnums.code.equals(code)){
                return methodEnums;
            }
        }
        return LOCAL;
    }
}
